package com.itheima.demo02;

import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

public class MainDemo03 {
    public static void main(String[] args) {
        method1();
        LocalDateTime localDateTime = LocalDateTime.of(2020,11,11,12,13,14);
        System.out.println(localDateTime);
        DateTimeFormatter pattern = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss");
        String s = localDateTime.format(pattern);
        System.out.println(s);
    }

    private static void method1() {
        String s = "2020年12月12日 13:14:15";
        DateTimeFormatter pattern = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss");
        LocalTime parse = LocalTime.parse(s, pattern);
    }
}
